<div class="form">

    <?php $form=$this->beginWidget('CActiveForm', array(
        'id'=>'comment-form',
        'enableAjaxValidation'=>true,
        )); ?>

    <p class="note">
    <?php
        echo Yii::t('Site','FIELDS WITH {star} ARE REQUIRED',array('star'=>"<span class='required'>*</span>"));
    ?>

    <?php echo $form->errorSummary($model); ?>
    <div class="row">
        <?php echo $form->labelEx($model,'author'); ?>
        <?php echo $form->textField($model,'author',array('size'=>50,'maxlength'=>50)); ?>
        <?php echo $form->error($model,'author'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'email'); ?>
        <?php echo $form->textField($model,'email',array('size'=>50,'maxlength'=>50)); ?>
        <?php echo $form->error($model,'email'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'url'); ?>
        <?php echo $form->textField($model,'url',array('size'=>50,'maxlength'=>50)); ?>
        <?php echo $form->error($model,'url'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model,'content'); ?>
        <?php echo $form->textArea($model,'content',array('rows'=>6, 'cols'=>50)); ?>
        <?php echo $form->error($model,'content'); ?>
    </div>
    <?php
        echo $form->hiddenField($post,'id');
    ?>

    <div id="khoa">

    </div>


    <div class="row buttons">

        <?php 

            //echo CHtml::submitButton($model->isNewRecord ?Yii::t('Site','COMMENT') : Yii::t('Site','SAVE')); 

            echo CHtml::ajaxLink(
            Yii::t('Site','COMMENT'),
            Yii::app()->createUrl("post/AddNewComment"),
            array(
            "type"=>"POST", 
            'update'=>'#number-comment',
            'success'=>"function(){
                $.fn.yiiListView.update('list-comment');
            }",
            ),
            array("href" => Yii::app()->createUrl("post/AddNewComment")) 
            );






        ?>


    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->